package com.utils;

import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import java.util.Map.Entry;

/**
 * 
 * @author Administrator
 *
 */

public class entryCls {
	
	public static void main(String[]args){
		
		Map<Integer,Integer> entry=new HashMap<Integer,Integer>();
		
		for(int i=0;i<10;i++){
			entry.put(Integer.valueOf(i), Integer.valueOf(2*i));
		}
		
		for(Entry<Integer,Integer> e:entry.entrySet()){
			System.out.print("key"+e.getKey());
			System.out.println(" value:"+e.getValue());
		}
		
		for(Iterator<Entry<Integer,Integer>> i=entry.entrySet().iterator();i.hasNext();){
			Entry<Integer,Integer> e=i.next();
			System.out.print("key:"+e.getKey());
			System.out.println("\tvalue:"+e.getValue());
		} 
		
	} 
}
